import Vue from 'vue';
import Vuex from 'vuex';

Vue.use(Vuex);

export default new Vuex.Store({
	state: {
		topoList: [],
		tagList: [],
		topoMapURL: 'http://192.168.0.211:60666/media/topo_files/evpn-mpls_vlan-bundle-service_NE5K-vMX/evpn-mpls_vlan-bundle-service_NE5K-vMX.png',
		topoInfoURL: '',
		// deviceList: [],
	},
	mutations: {
		// update_deviceList(state, list) {
		//   state.deviceList = list
		// },
		update_tagList(state, tags) {
			state.tagList = tags;
		},
		update_topoList(state, topos) {
			state.topoList = topos;
		},
		update_topoMapURL(state, name) {
			state.topoMapURL = 'http://192.168.0.211:60666/media/topo_files/' + name + '/' + name + '.png';
		},
		update_topoInfoURL(state, name) {
			state.topoInfoURL = 'http://192.168.0.211:60666/media/topo_files/' + name + '/' + name + '.txt';
		},
	},
	actions: {},
	modules: {},
});
